
package com.fire.eyes.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.fire.eyes.dao.ErrorCodeMapper;
import com.fire.eyes.model.ErrorCodeModel;
import com.fire.eyes.service.IErrorCodeService;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.plugins.Page;

import java.util.List;
import java.util.Map;

/**
 * 错误码提示语Service
 *
 * @author Matthew
 * @Date 2019-01-17 20:48
 */
@Service
public class ErrorCodeServiceImpl extends ServiceImpl<ErrorCodeMapper, ErrorCodeModel> implements IErrorCodeService{

    private static final Logger LOGGER = LoggerFactory.getLogger(ErrorCodeServiceImpl.class);

    @Autowired
    private ErrorCodeMapper errorCodeMapper;

    @Override
    public ErrorCodeModel selectOne(ErrorCodeModel entity){
        return errorCodeMapper.selectOne(entity);
    }

    @Override
    public List<ErrorCodeModel>selectList(ErrorCodeModel model){
        return errorCodeMapper.selectListByModel(model);
    }

    @Override
    public Page<ErrorCodeModel> selectPage(int currentPage, int pageSize, Wrapper<ErrorCodeModel> wrapper){
        return selectPage(new Page<ErrorCodeModel>(currentPage,pageSize), wrapper);
    }

    @Override
    public Page<Map<String, Object>> selectMapsPage(int currentPage, int pageSize, Wrapper<ErrorCodeModel> wrapper){
        return selectMapsPage(new Page<ErrorCodeModel>(currentPage,pageSize), wrapper);
    }

}
